package com.willian.andrappfw.bean;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;

import java.io.Serializable;


@Entity
public class FileBean implements Serializable, Comparable<FileBean> {
    private static final long serialVersionUID = -2960490120360769141L;

    @Id(autoincrement = true)
    private Long id;
    private String carType;
    private String color;
    private String vin;
    private String imei;
    private long createTime;
    private String name;
    private String email;
    private String tel;
    private int userId;

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    @Generated(hash = 214442650)
    public FileBean(Long id, String carType, String color, String vin, String imei,
                      long createTime, String name, String email, String tel, int userId) {
        this.id = id;
        this.carType = carType;
        this.color = color;
        this.vin = vin;
        this.imei = imei;
        this.createTime = createTime;
        this.name = name;
        this.email = email;
        this.tel = tel;
        this.userId = userId;
    }

    @Generated(hash = 54048188)
    public FileBean() { }

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCarType() {
        return this.carType;
    }

    public void setCarType(String carType) {
        this.carType = carType;
    }

    public String getColor() {
        return this.color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getVin() {
        return this.vin;
    }

    public void setVin(String vin) {
        this.vin = vin;
    }

    public String getImei() {
        return this.imei;
    }

    public void setImei(String imei) {
        this.imei = imei;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEmail() {
        return this.email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getTel() {
        return this.tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    @Override
    public int compareTo(FileBean o) {
        return this.createTime - o.getCreateTime() > 0 ? -1 : 1;
    }
}
